#pragma once

#include "LiteralNull.h"


namespace uml {

LiteralNull::LiteralNull(const QString& umlType)
    : LiteralSpecification(umlType) {}

void LiteralNull::fromJson(const QJsonObject& json, QStringList& errorList) {
    if (json.isEmpty()) {
        return;
    }

    LiteralSpecification::fromJson(json, errorList);
}

void LiteralNull::toJson(QJsonObject& json) {
    LiteralSpecification::toJson(json);
}

/// <summary>
/// isComputable
    /// The query isComputable() is redefined to be true.
/// </summary>
    /// <code>
    /// result = (true)
    /// </code>
bool LiteralNull::isComputable() const
{
    return false;
}

/// <summary>
/// isNull
    /// The query isNull() returns true.
/// </summary>
    /// <code>
    /// result = (true)
    /// </code>
bool LiteralNull::isNull() const
{
    return false;
}

} // namespace uml
